
Enterprise Core Objects  ECO - Examples  
----------------------------------------

Before running an example, take a look at the UML class diagram by selecting
View | Model View in the IDE. Then expand the CoreClasses node, representing a UML Package, to expose the included classes and associations (if any).  Double-click the diagram node (also named CoreClasses) within the package, to open the diagram designer.  

Note: the UML class diagram are independent diagrams, without platform-specific implementation details.  The Model View tree also contains a number of other nodes. Expanding and opening the diagrams for these will open a read-only diagram, this time including all elements, with full implementation details. 


EcoBuilding 
-----------

- Description:

This application handles peoples and their relations to buildings. A person can own a building, and be a resident of a ResidentialBuilding.

The example also shows how to do perform some of the Eco framework capabilities in runtime, such as creating or modifying a database. 

- How to use:

Create buildings, residential Buildings and Persons using the create buttons. 

Double click the building grid to bring up a dialog for a building, the drag and drop from a
persons record in the main dialog to assign residents and owners. Note that a person can only be resident of a ResidentialBuilding. 

When a residential building has owners and residents the operations ChargeRent and PayRent can be invoked, once the tenants have resources to pay.

The example also uses Undo, Redo and Setting multiple undo checkpoints.


- Persistence requirements:

This example uses an XML file for persistence. 

To use the evolve database mechanism, the persistence needs to use a SQL database such as Interbase. Then you can add an appropriate persistence mapper, such as BDPPersistenceMapper, as well as a database connection, such as BDPConnection.

- ECO Model features:

Derived attributes derived by OCL expressions. 



MeetingManager
--------------

- Description:

This application manages meetings and participants. A participant can be a individual, a resource (such as conference room or hardware), or a group of participants. 

- How to use:

Create instances of Meetings, Persons, Groups and Resources using the New buttons. 

Double click any object, in column 0, to open the autoform. 
Drag, from column 0, any object to add it to a grid in the autoform. 

As in EcoBuilding, above, use drag and drop to assign participants to meetings, meetings to participants, or participants to groups. 

The example also uses Undo, and Redo. Press Save button to store all changed objects to the database.

- Persistence requirements:

This example also uses an XML file for persistence. 

- ECO Model features:

Derived attributes derived using code; Meeting.EndTime 
Derived association, between Meeting and Participant, derived using an OCL expressions
Association Class
Attribute Meeting.Time, use tagged value ColumnName to set column name (note that Time is a reserved word in SQL)

